package com.like.hospitalworld;

import android.os.Bundle;
import android.os.PersistableBundle;
import android.view.View;

import com.like.fragment.CollectionCategoryFragment;
import com.like.fragment.CollectionListFragment;
import com.like.fragment.TwoTabFragment;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;

@ContentView(R.layout.activity_collection)
public class CollectionActivity extends BaseActivity {

    private TwoTabFragment mTwoTabFragment;
    private CollectionListFragment mListFragment;
    private CollectionCategoryFragment mCateFragment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        initFragments();
    }

    private void initFragments() {
        mListFragment = new CollectionListFragment();
        mCateFragment = new CollectionCategoryFragment();
        mTwoTabFragment = new TwoTabFragment();
        mTwoTabFragment.setTitles("列表", "分类");
        mTwoTabFragment.setFragments(mListFragment, mCateFragment);
        getSupportFragmentManager().beginTransaction().add(R.id.collection_container, mTwoTabFragment).commit();
    }

}
